<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../../../include/admincontent.jsp" %>
<div id="location">当前位置：首页 > 招聘实施 > 内部招聘 > 职位申请</div>
<div id="Content">
    <div class="btnbar">
        <button type="button" class="card" id="do_nzopen">开启</button>
        <button type="button" class="card" id="do_nzclose">关闭</button>
        <button type="button" class="back" onclick="javascript:history.go(-1);">返 回</button>
    </div>

    <!-- 筛选条件 -->
    <div id="searchbox">
        <form id="sform">
            <input type="hidden" name="pid" value="${pid}"/>
            <input type="hidden" name="deptcode" value="${deptcode}"/>
            <table class="treeTable searchform">
                <thead>
                <tr>
                    <td width="60">员工号：</td>
                    <td width="120">
                        <div><input type="text" name="code"/></div>
                    </td>
                    <td width="60">姓名：</td>
                    <td width="120">
                        <div><input type="text" name="name"/></div>
                    </td>
                    <td width="40">性别：</td>
                    <td width="120">
                        <div>
                            <select name="sex">
                                <option value="">全部</option>
                                <option value="男">男</option>
                                <option value="女">女</option>
                            </select>
                        </div>
                    </td>
                    <td width="40"></td>
                    <td></td>
                </tr>
                <tr>
                    <td>所在部门：</td>
                    <td>
                        <div><input type="text" name="dept1"/></div>
                    </td>
                    <td>政治面貌：</td>
                    <td>
                        <div><input type="text" name="zzmm"/></div>
                    </td>
                    <td>学历：</td>
                    <td>
                        <div><input type="text" name="education"/></div>
                    </td>
                    <td>
                        <button id="searchbtn" type="button" class="search"></button>
                    </td>
                    <td></td>
                </tr>
                </thead>
            </table>
        </form>
    </div>
    <table class="treeTable" id="tablelist">
        <thead>
        <tr>
            <td width="20"><input type="checkbox" class="allcheckbox" title="选择全部/取消全选"/></td>
            <td width="25">序号</td>
            <td width="40">员工号</td>
            <td width="50">姓名</td>
            <td width="40">性别</td>
            <td width="40">年龄</td>
            <td width="60">政治面貌</td>
            <td width="80">出生时间</td>
            <td width="100">进入集团时间</td>
            <td width="80">学历</td>
            <td width="100">联系方式</td>
            <td></td>
        </tr>
        </thead>
        <tbody id="result"></tbody>
    </table>
    <div id="page"></div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        getList();
        $('#searchbtn').click(function () {
            getList();
        });

        $('#do_nzopen').click(function () {
            layer.confirm('开启以后应聘者可以投简历。<br>确定要开启吗？', {
                btn: ['是', '否']
            }, function () {
                var url = '/Do/NZApply/OpenCloseAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}&state=1';
                postAjax(url, null, function (data) {
                    $.Showmsg(data.Message);
                });
                layer.closeAll();
            }, function () {
                layer.closeAll();
            });
        });

        $('#do_nzclose').click(function () {
            layer.confirm('关闭以后应聘者不能投简历。<br>确定要关闭吗？', {
                btn: ['是', '否']
            }, function () {
                var url = '/Do/NZApply/OpenCloseAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}&state=2';
                postAjax(url, null, function (data) {
                    $.Showmsg(data.Message);
                });
                layer.closeAll();
            }, function () {
                layer.closeAll();
            });
        });

    });

    function getList() {
        $('#page').myPagination({
            cssStyle: "pagination",
            ajax: {
                on: true,
                url: '${path}/Do/NZApply/getusers?flowid=${fid}',
                param: $('#sform').serialize(),
                dataType: 'html',
                callback: function (data) {
                    $('#result').html(data);
                }
            }
        });
    }
</script>
</body>
</html>